上传文件不需要设置content-type
将formData直接放于响应体,提交时浏览器会自动设置。1
2
3
4
5
6
7
8fetch.postJSON('/sharer/certificate/upload', {
// ...data
},
{
headers: new Headers(),
body: fromData
}
)
1 | Request Headers |
https://stackoverflow.com/questions/35192841/fetch-post-with-multipart-form-data/35206069
上传文件multipart form-data boundary 说明 http://www.cnblogs.com/yydcdut/p/3736667.html